package com.kt.demo.service;

import com.kt.demo.dao.AppInfoMapper;
import com.kt.demo.dao.AppVersionMapper;
import com.kt.demo.pojo.AppVersion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class AppVersionService implements AppVersionMapper {

    @Autowired
    private AppVersionMapper appVersionMapper;
    @Autowired
    private AppInfoMapper appInfoMapper;


    @Override
    public int deleteVersionByAppId(Integer appId) throws Exception {
        return appVersionMapper.deleteVersionByAppId(appId) ;
    }

    @Override
    public int add(AppVersion appVersion)
    {
        return appVersionMapper.add(appVersion);
    }

    @Override
    public AppVersion getAppVersionById(int id) {
        return appVersionMapper.getAppVersionById(id);
    }

    @Override
    public int modify(AppVersion appVersion) throws Exception {
        return appVersionMapper.modify(appVersion);
    }


    @Override
    public List<AppVersion> getAppVersionList(Integer appId) throws Exception {
        return appVersionMapper.getAppVersionList(appId);
    }

    @Override
    public int getVersionCountByAppId(Integer appId) throws Exception {
        return appVersionMapper.getVersionCountByAppId(appId);
    }

    @Override
    public int deleteApkFile(Integer id) throws Exception {
        return appVersionMapper.deleteApkFile(id);
    }
}
